package router

import (
	"fmt"
	"git.tmuyu.com.cn/ginOne/controller"
	"github.com/gin-gonic/gin"
	_ "github.com/sirupsen/logrus"
)
var (
	router = NewGinEngine()
)
func Run()error{
	host := ""
	port := 8080
	return router.Run(fmt.Sprintf("%s:%d", host, port))
}
func NewGinEngine() *gin.Engine {
	router := gin.New()
	router.Use(gin.LoggerWithConfig(gin.LoggerConfig{
		SkipPaths: []string{"/version"},
	}), gin.Recovery())

	return router
}
func init(){
	//router.Any("/*proxy",controller.ANY)
	router.GET("/wx_index", controller.GE)
	//router.POST("/*proxy",controller.POST)

}